import Taro, { Component } from '@tarojs/taro'
import { View, Button, Text, Image } from '@tarojs/components'
import { connect } from '@tarojs/redux'
import './list.less'

class Template extends Component {

  render() {
    const { customer_list_counts } = this.props;
    return (
      <View className="customer-list">
      <View className="list-title">客户列表</View>
        <View className="list-body">
          {
            customer_list_counts.map((item, index) => {
              return (
                <View key={index} className="customer-list-one customer-list-one-divider" onClick={() => {
                  Taro.redirectTo({
                    url:"/pages/customer/list?type="+item.state+"&status=1"
                  })
                }}>
                  <View className="at-row">
                    <View className="at-col at-col-9">{item.title}</View>
                    <View className={`at-col at-col-2 already-sub-cum ${item.class}`}>
                      {item.count}
                    </View>
                    <View className="at-col at-col-1 arrow-con">
                      <Image
                        className="arrow-img"
                        src={require("../../assets/img/arrow.png")}
                      />
                    </View>
                  </View>
                </View>
              )
            })
          }

        {/* <View className="customer-list-one customer-list-one-divider">
          <View className="at-row">
            <View className="at-col at-col-9">已预约客户</View>
            <View className="at-col at-col-2 already-sub-cum make-sub-color">
              600
            </View>
            <View className="at-col at-col-1 arrow-con">
              <Image
                className="arrow-img"
                src={require("../../assets/img/arrow.png")}
              />
            </View>
          </View>
        </View>
        <View className="customer-list-one customer-list-one-divider">
          <View className="at-row">
            <View className="at-col at-col-9">已到司客户</View>
            <View className="at-col at-col-2 already-sub-cum come-sub-color">
              600
            </View>
            <View className="at-col at-col-1 arrow-con">
              <Image
                className="arrow-img"
                src={require("../../assets/img/arrow.png")}
              />
            </View>
          </View>
        </View>
        <View className="customer-list-one customer-list-one-divider">
          <View className="at-row">
            <View className="at-col at-col-9">已成交客户</View>
            <View className="at-col at-col-2 already-sub-cum done-sub-color">
              600
            </View>
            <View className="at-col at-col-1 arrow-con">
              <Image
                className="arrow-img"
                src={require("../../assets/img/arrow.png")}
              />
            </View>
          </View>
        </View>
        <View className="customer-list-one ">
          <View className="at-row">
            <View className="at-col at-col-9">已流失客户</View>
            <View className="at-col at-col-2 already-sub-cum lose-sub-color">
              600
            </View>
            <View className="at-col at-col-1 arrow-con">
              <Image
                className="arrow-img"
                src={require("../../assets/img/arrow.png")}
              />
            </View>
          </View>
        </View> */}
      </View>
    </View>
    )
  }
}
export default Template
